#pragma once

#include<stdio.h>
#include<assert.h>
#include<stdlib.h>

typedef int DCListDataType;

typedef struct DCLNode
{
	struct DCLNode* prev;
	struct DCLNode* next;
	DCListDataType data;
}DCLNode;

DCLNode* DCLInit();
void DCLPrint(const DCLNode* phead);

void DCLPushBack(DCLNode* phead, DCListDataType x);
void DCLPopBack(DCLNode* phead);

void DCLPushFront(DCLNode* phead, DCListDataType x);
void DCLPopFront(DCLNode* phead);

int DCLSize(const DCLNode* phead);

DCLNode* DCLFind(const DCLNode* phead, DCListDataType x);

void DCLInsert(DCLNode* pos, DCListDataType x);
void DCLErase(DCLNode* pos);